﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Com.Rivyer.Web
{
    public partial class index_left : System.Web.UI.Page
    {
        private readonly BLL.userauthorityBll authoritybll = new BLL.userauthorityBll();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["username"] != null
                && Session["username"].ToString().Trim().Length != 0)
            {
                Model.userauthorityModel aumodel = authoritybll.GetModel(Session["username"].ToString());
                if (aumodel.isadmin == 1)
                {
                    admin.Visible = true;
                    ipmanage.Visible = true;
                    monitormanage.Visible = true;
                    materialmanage.Visible = true;
                    //jobdone.Visible = true;
                    ipchange.Visible = true;
                }

                if (aumodel.ipmanager == 1)
                {
                    ipmanage.Visible = true;
                }

                if (aumodel.monitormanager == 1)
                {
                    monitormanage.Visible = true;
                }

                if (aumodel.materailmanager == 1)
                {
                    materialmanage.Visible = true;
                }

                /*
                if (aumodel.isminister == 1)
                {
                    jobdone.Visible = false;
                }*/

                if (aumodel.issection == 1)
                {
                    ipchange.Visible = true;
                }
            }


        }


    }
}